﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Demo</title>
    <style type="text/css">
        body, p
        {
            margin: 0 auto;
            font-family: 宋体;
        }

        p
        {
            line-height: 20px;
            font-size: 14px;
            padding-left: 20px;
        }
    </style>
</head>
<body>
    <p style="color: #f00000;">
        代码结束如果不换行就在后面添加空格
    </p>
    <p>
        using写法<br />
        @@using{
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;System;<br />
        &nbsp;&nbsp;&nbsp;&nbsp;Tester.ClassForTest;<br />
        &nbsp;&nbsp;&nbsp;&nbsp;System.Globalization;<br />
        }<br />
    </p>
    <p>
        声明写法<br />
        @@{<br />
        &nbsp;&nbsp;&nbsp;&nbsp;string Count="123";<br />
        &nbsp;&nbsp;&nbsp;&nbsp;int Temp=1234;<br />
        &nbsp;&nbsp;&nbsp;&nbsp;List&lt;ManInfo&gt; lsManInfo=ViewData["Data2"] as List&lt;ManInfo&gt;;<br />
        }<br />
    </p>
    <p>
        变量<br />
        @@Temp 
        <br />
        方法<br />
        @@System.Configuration.ConfigurationManager.ConnectionStrings["BlogDbContext"].ToString()<br />
        @@DateTime.Now.ToString()<br />
    </p>

    <p>
        @@TesterEx.Get("123321")
        <br />
    </p>
    <p>
        @@for(int i = 0; i <= 10; i++){<br />
        <span>&nbsp;&nbsp;&nbsp;&nbsp;if(i % 2 == 0){<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@@i<br />
            &nbsp;&nbsp;&nbsp;&nbsp;}<br />
            &nbsp;&nbsp;&nbsp;&nbsp;else{<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@@Temp<br />
            &nbsp;&nbsp;&nbsp;&nbsp;}<br />
        </span>
        }
    </p>
    <p>
        @@ViewData["test"]
    </p>
    <p>
        注释符<br />
        @@*{
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;TesterEx.Get("123321")
        <br />
        }
    </p>
    <p>
        模板<br />
        @@Layout="~/Layout/Layout1.html"
    </p>
    <p>
        用户控件<br />
        @@Include("~/UserControl/Left.html")
    </p>
    <p>
        占位符<br />
        @@PlaceHolder("Role")
    </p>
    <p>
        占位符内容替换<br />
        @@PlaceContent("Role"){
        <br />
        }
    </p>
</body>
</html>
